public class Oddthree {
    public static void main(String[] args) {
        int[] arr = {1,2,34,3,4,5,7,23,12};
        int i = 0;
        int k = 0;
        int tem = arr.length;
        boolean flag = false;
        for (i = 0;i < tem -2;i++){
            if (arr[i] % 2 == 1 && arr[i+1] % 2 == 1 && arr[i + 2] % 2 == 1){
                flag =true;
                break;
            }
        }
        System.out.println(arr[i]+" "+arr[i+1]+" "+arr[i + 2]);
        if (flag == true){
            System.out.println("存在连续三个元素都是奇数的情况");
        }
    }
}
